<template>
  <div class="content-page-header">
    <div class="page-header__left">
      <span class="header-title__text">{{ props.title }}</span>
      <el-divider class="header-title__vertical" direction="vertical"></el-divider>
      <span class="header-title__desc">{{ props.descText }}</span>
      <slot name="headerLeftTips"></slot>
    </div>
    <div class="page-header__right">
      <slot name="headerRight"></slot>
    </div>
  </div>
</template>

<script lang="ts" setup name="ContentPageHeader">
import { defineProps } from 'vue';
interface ContentPageHeaderProps {
  title: string;
  descText?: string;
}

const props = defineProps<ContentPageHeaderProps>();
</script>

<style lang="scss" scoped>
.content-page-header {
  margin: 0 20px;
  width: calc(100% - 40px);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f2f3f5;
  .page-header__left {
    display: flex;
    align-items: center;
  }
  .header-title__text {
    font-size: 14px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #0a1f33;
    line-height: 22px;
  }
  .header-title__vertical {
    height: 10px;
  }
  .header-title__desc {
    font-size: 12px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #7a8a99;
    line-height: 20px;
  }
}
</style>
